
package se.sll.service.catalogue.product.api.resource;

import java.util.List;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.Response;
import se.sll.service.catalogue.product.api.model.Code;
import se.sll.service.catalogue.product.api.model.ProductCreate;
import se.sll.service.catalogue.product.api.model.ProductList;


/**
 * Service for creating, updating, reading products.
 * 
 */
@Path("products")
public interface ProductService {


    /**
     * List all stored Products
     * 
     */
    @GET
    @Produces({
        "application/json"
    })
    ProductService.GetProductsResponse getProducts()
        throws Exception
    ;

    /**
     * Create a new product
     * 
     * @param entity
     *      e.g. {
     *       "name" : "Product Name",
     *       "description : "Product Description",
     *       "status" : "ACTIVE",
     *       "updatedByHsaid" : "SE2321000016-1HF3",
     *       "displayName" : "Product Displayname"
     *     }
     *     
     */
    @POST
    @Consumes("application/json")
    @Produces({
        "application/json"
    })
    ProductService.PostProductsResponse postProducts(ProductCreate entity)
        throws Exception
    ;

    /**
     * Update a product
     * 
     * @param entity
     *      e.g. {
     *       "name" : "Product Name",
     *       "description : "Product Description",
     *       "status" : "ACTIVE",
     *       "updatedByHsaid" : "SE2321000016-1HF3",
     *       "displayName" : "Product Displayname"
     *     }
     *     
     */
    @PUT
    @Consumes("application/json")
    @Produces({
        "application/json"
    })
    ProductService.PutProductsResponse putProducts(ProductCreate entity)
        throws Exception
    ;

    /**
     * Lists all Products matching the provided Code System and Name
     * 
     * @param codeSystem
     *     
     * @param codeName
     *     
     */
    @GET
    @Path("codesystems/{codeSystem}/codes/{codeName}")
    @Produces({
        "application/json"
    })
    ProductService.GetProductsCodesystemsByCodeSystemCodesByCodeNameResponse getProductsCodesystemsByCodeSystemCodesByCodeName(
        @PathParam("codeSystem")
        String codeSystem,
        @PathParam("codeName")
        String codeName)
        throws Exception
    ;

    /**
     * Returns information about the product with the specified name
     * 
     * @param productName
     *     
     */
    @GET
    @Path("{productName}")
    @Produces({
        "application/json"
    })
    ProductService.GetProductsByProductNameResponse getProductsByProductName(
        @PathParam("productName")
        String productName)
        throws Exception
    ;

    /**
     * Delete the product with the specified product name
     * 
     * @param productName
     *     
     */
    @DELETE
    @Path("{productName}")
    ProductService.DeleteProductsByProductNameResponse deleteProductsByProductName(
        @PathParam("productName")
        String productName)
        throws Exception
    ;

    /**
     * Adds the specified code system code to the specified product.
     * 
     * @param productName
     *     
     * @param entity
     *      e.g. {
     *       "oid" : "1.2.4.5",
     *       "code" : "157H",
     *       "description" : "Code description",
     *       "displayName" : "Code displayname",
     *       "CodeSystem" : "Name of the Code System indicated by the OID"
     *     }
     *     
     */
    @PUT
    @Path("{productName}/add/code")
    @Consumes("application/json")
    ProductService.PutProductsByProductNameAddCodeResponse putProductsByProductNameAddCode(
        @PathParam("productName")
        String productName, Code entity)
        throws Exception
    ;

    /**
     * Fetches Code System Codes for the Product with the specified product name.
     * 
     * @param productName
     *     
     */
    @GET
    @Path("{productName}/codes/")
    @Produces({
        "application/json"
    })
    ProductService.GetProductsByProductNameCodesResponse getProductsByProductNameCodes(
        @PathParam("productName")
        String productName)
        throws Exception
    ;

    /**
     * Sets the entire collection of Code System Codes for the Product with the specified product name.
     * 
     * @param productName
     *     
     * @param entity
     *      e.g. [
     *       {
     *         "oid" : "1.2.4.5",
     *         "code" : "157H",
     *         "description" : "Code description",
     *         "displayName" : "Code displayname",
     *         "CodeSystem" : "Name of the Code System indicated by the OID"
     *       }
     *     ]
     *     
     */
    @PUT
    @Path("{productName}/codes/")
    @Consumes("application/json")
    @Produces({
        "application/json"
    })
    ProductService.PutProductsByProductNameCodesResponse putProductsByProductNameCodes(
        @PathParam("productName")
        String productName, List<Code> entity)
        throws Exception
    ;

    /**
     * 
     * @param productName
     *     The query string.
     */
    @GET
    @Path("namecontains")
    @Produces({
        "application/json"
    })
    ProductService.GetProductsNamecontainsResponse getProductsNamecontains(
        @QueryParam("productName")
        String productName)
        throws Exception
    ;

    /**
     * 
     * @param productName
     *     A comma seperated list of product names to set. (RAML doesn't seem to have a way to set this, so it's just a string for now)
     */
    @GET
    @Path("names")
    @Produces({
        "application/json"
    })
    ProductService.GetProductsNamesResponse getProductsNames(
        @QueryParam("productName")
        String productName)
        throws Exception
    ;

    /**
     * 
     * @param productName
     *     A query string for product beginning with this String.
     */
    @GET
    @Path("names/namebeginswith")
    @Produces({
        "application/json"
    })
    ProductService.GetProductsNamesNamebeginswithResponse getProductsNamesNamebeginswith(
        @QueryParam("productName")
        String productName)
        throws Exception
    ;

    /**
     * 
     * @param codeName
     *     The query string.
     */
    @GET
    @Path("codes")
    @Produces({
        "application/json"
    })
    ProductService.GetProductsCodesResponse getProductsCodes(
        @QueryParam("codeName")
        String codeName)
        throws Exception
    ;

    public class DeleteProductsByProductNameResponse
        extends se.sll.service.catalogue.product.api.support.ResponseWrapper
    {


        private DeleteProductsByProductNameResponse(Response delegate) {
            super(delegate);
        }

        /**
         * The deletion was successful
         * 
         */
        public static ProductService.DeleteProductsByProductNameResponse oK() {
            Response.ResponseBuilder responseBuilder = Response.status(200);
            return new ProductService.DeleteProductsByProductNameResponse(responseBuilder.build());
        }

    }

    public class GetProductsByProductNameCodesResponse
        extends se.sll.service.catalogue.product.api.support.ResponseWrapper
    {


        private GetProductsByProductNameCodesResponse(Response delegate) {
            super(delegate);
        }

        /**
         * The requested Product was found and its Codes are returned in the body. e.g. [
         *   {
         *     "oid" : "1.2.4.5",
         *     "code" : "157H",
         *     "description" : "Code description",
         *     "displayName" : "Code displayname",
         *     "CodeSystem" : "Name of the Code System indicated by the OID"
         *   }
         * ]
         * 
         * 
         * @param entity
         *     [
         *       {
         *         "oid" : "1.2.4.5",
         *         "code" : "157H",
         *         "description" : "Code description",
         *         "displayName" : "Code displayname",
         *         "CodeSystem" : "Name of the Code System indicated by the OID"
         *       }
         *     ]
         *     
         */
        public static ProductService.GetProductsByProductNameCodesResponse jsonOK(List<Code> entity) {
            Response.ResponseBuilder responseBuilder = Response.status(200).header("Content-Type", "application/json");
            responseBuilder.entity(entity);
            return new ProductService.GetProductsByProductNameCodesResponse(responseBuilder.build());
        }

    }

    public class GetProductsByProductNameResponse
        extends se.sll.service.catalogue.product.api.support.ResponseWrapper
    {


        private GetProductsByProductNameResponse(Response delegate) {
            super(delegate);
        }

        /**
         * The requested Product was found and is returned in the body. e.g. {
         *   "status" : "ACTIVE",
         *   "name" : "Product Name",
         *   "displayName" : "Product Displayname",
         *   "description : "Product Description",
         *   "creationTime": 1425410281000,
         *   "updateTime": 1425410281000,
         *   "updatedByHsaid" : "SE2321000016-1HF3",
         *   "codes": [
         *     {
         *       "oid" : "1.2.4.5",
         *       "code" : "157H",
         *       "description" : "Code description",
         *       "displayName" : "Code displayname",
         *       "CodeSystem" : "Name of the Code System indicated by the OID"
         *     }
         *   ]
         * }
         * 
         * 
         * @param entity
         *     {
         *       "status" : "ACTIVE",
         *       "name" : "Product Name",
         *       "displayName" : "Product Displayname",
         *       "description : "Product Description",
         *       "creationTime": 1425410281000,
         *       "updateTime": 1425410281000,
         *       "updatedByHsaid" : "SE2321000016-1HF3",
         *       "codes": [
         *         {
         *           "oid" : "1.2.4.5",
         *           "code" : "157H",
         *           "description" : "Code description",
         *           "displayName" : "Code displayname",
         *           "CodeSystem" : "Name of the Code System indicated by the OID"
         *         }
         *       ]
         *     }
         *     
         */
        public static ProductService.GetProductsByProductNameResponse jsonOK(ProductList entity) {
            Response.ResponseBuilder responseBuilder = Response.status(200).header("Content-Type", "application/json");
            responseBuilder.entity(entity);
            return new ProductService.GetProductsByProductNameResponse(responseBuilder.build());
        }

    }

    public class GetProductsCodesResponse
        extends se.sll.service.catalogue.product.api.support.ResponseWrapper
    {


        private GetProductsCodesResponse(Response delegate) {
            super(delegate);
        }

        /**
         * The requested Product information was found and is returned in the body. e.g. [
         *   {
         *     "status" : "ACTIVE",
         *     "name" : "Product Name",
         *     "displayName" : "Product Displayname",
         *     "description : "Product Description",
         *     "creationTime": 1425410281000,
         *     "updateTime": 1425410281000,
         *     "updatedByHsaid" : "SE2321000016-1HF3",
         *     "codes": [
         *       {
         *         "oid" : "1.2.4.5",
         *         "code" : "157H",
         *         "description" : "Code description",
         *         "displayName" : "Code displayname",
         *         "codeSystem" : "Name of the Code System indicated by the OID"
         *       }
         *     ]
         *   }
         * ]
         * 
         * 
         * @param entity
         *     [
         *       {
         *         "status" : "ACTIVE",
         *         "name" : "Product Name",
         *         "displayName" : "Product Displayname",
         *         "description : "Product Description",
         *         "creationTime": 1425410281000,
         *         "updateTime": 1425410281000,
         *         "updatedByHsaid" : "SE2321000016-1HF3",
         *         "codes": [
         *           {
         *             "oid" : "1.2.4.5",
         *             "code" : "157H",
         *             "description" : "Code description",
         *             "displayName" : "Code displayname",
         *             "codeSystem" : "Name of the Code System indicated by the OID"
         *           }
         *         ]
         *       }
         *     ]
         *     
         */
        public static ProductService.GetProductsCodesResponse jsonOK(List<ProductList> entity) {
            Response.ResponseBuilder responseBuilder = Response.status(200).header("Content-Type", "application/json");
            responseBuilder.entity(entity);
            return new ProductService.GetProductsCodesResponse(responseBuilder.build());
        }

    }

    public class GetProductsCodesystemsByCodeSystemCodesByCodeNameResponse
        extends se.sll.service.catalogue.product.api.support.ResponseWrapper
    {


        private GetProductsCodesystemsByCodeSystemCodesByCodeNameResponse(Response delegate) {
            super(delegate);
        }

        /**
         * The requested Product was found and is returned in the body. e.g. [
         *   {
         *     "status" : "ACTIVE",
         *     "name" : "Product Name",
         *     "displayName" : "Product Displayname",
         *     "description : "Product Description",
         *     "creationTime": 1425410281000,
         *     "updateTime": 1425410281000,
         *     "updatedByHsaid" : "SE2321000016-1HF3",
         *     "codes": [
         *       {
         *         "oid" : "1.2.4.5",
         *         "code" : "157H",
         *         "description" : "Code description",
         *         "displayName" : "Code displayname",
         *         "codeSystem" : "Name of the Code System indicated by the OID"
         *       }
         *     ]
         *   }
         * ]
         * 
         * 
         * @param entity
         *     [
         *       {
         *         "status" : "ACTIVE",
         *         "name" : "Product Name",
         *         "displayName" : "Product Displayname",
         *         "description : "Product Description",
         *         "creationTime": 1425410281000,
         *         "updateTime": 1425410281000,
         *         "updatedByHsaid" : "SE2321000016-1HF3",
         *         "codes": [
         *           {
         *             "oid" : "1.2.4.5",
         *             "code" : "157H",
         *             "description" : "Code description",
         *             "displayName" : "Code displayname",
         *             "codeSystem" : "Name of the Code System indicated by the OID"
         *           }
         *         ]
         *       }
         *     ]
         *     
         */
        public static ProductService.GetProductsCodesystemsByCodeSystemCodesByCodeNameResponse jsonOK(List<ProductList> entity) {
            Response.ResponseBuilder responseBuilder = Response.status(200).header("Content-Type", "application/json");
            responseBuilder.entity(entity);
            return new ProductService.GetProductsCodesystemsByCodeSystemCodesByCodeNameResponse(responseBuilder.build());
        }

    }

    public class GetProductsNamecontainsResponse
        extends se.sll.service.catalogue.product.api.support.ResponseWrapper
    {


        private GetProductsNamecontainsResponse(Response delegate) {
            super(delegate);
        }

        /**
         * The requested Product information was found and is returned in the body. e.g. [
         *   {
         *     "status" : "ACTIVE",
         *     "name" : "Product Name",
         *     "displayName" : "Product Displayname",
         *     "description : "Product Description",
         *     "creationTime": 1425410281000,
         *     "updateTime": 1425410281000,
         *     "updatedByHsaid" : "SE2321000016-1HF3",
         *     "codes": [
         *       {
         *         "oid" : "1.2.4.5",
         *         "code" : "157H",
         *         "description" : "Code description",
         *         "displayName" : "Code displayname",
         *         "codeSystem" : "Name of the Code System indicated by the OID"
         *       }
         *     ]
         *   }
         * ]
         * 
         * 
         * @param entity
         *     [
         *       {
         *         "status" : "ACTIVE",
         *         "name" : "Product Name",
         *         "displayName" : "Product Displayname",
         *         "description : "Product Description",
         *         "creationTime": 1425410281000,
         *         "updateTime": 1425410281000,
         *         "updatedByHsaid" : "SE2321000016-1HF3",
         *         "codes": [
         *           {
         *             "oid" : "1.2.4.5",
         *             "code" : "157H",
         *             "description" : "Code description",
         *             "displayName" : "Code displayname",
         *             "codeSystem" : "Name of the Code System indicated by the OID"
         *           }
         *         ]
         *       }
         *     ]
         *     
         */
        public static ProductService.GetProductsNamecontainsResponse jsonOK(List<ProductList> entity) {
            Response.ResponseBuilder responseBuilder = Response.status(200).header("Content-Type", "application/json");
            responseBuilder.entity(entity);
            return new ProductService.GetProductsNamecontainsResponse(responseBuilder.build());
        }

    }

    public class GetProductsNamesNamebeginswithResponse
        extends se.sll.service.catalogue.product.api.support.ResponseWrapper
    {


        private GetProductsNamesNamebeginswithResponse(Response delegate) {
            super(delegate);
        }

        /**
         * The requested Product information was found and is returned in the body. e.g. [
         *   {
         *     "status" : "ACTIVE",
         *     "name" : "Product Name",
         *     "displayName" : "Product Displayname",
         *     "description : "Product Description",
         *     "creationTime": 1425410281000,
         *     "updateTime": 1425410281000,
         *     "updatedByHsaid" : "SE2321000016-1HF3",
         *     "codes": [
         *       {
         *         "oid" : "1.2.4.5",
         *         "code" : "157H",
         *         "description" : "Code description",
         *         "displayName" : "Code displayname",
         *         "CodeSystem" : "Name of the Code System indicated by the OID"
         *       }
         *     ]
         *   }
         * ]
         * 
         * 
         * @param entity
         *     [
         *       {
         *         "status" : "ACTIVE",
         *         "name" : "Product Name",
         *         "displayName" : "Product Displayname",
         *         "description : "Product Description",
         *         "creationTime": 1425410281000,
         *         "updateTime": 1425410281000,
         *         "updatedByHsaid" : "SE2321000016-1HF3",
         *         "codes": [
         *           {
         *             "oid" : "1.2.4.5",
         *             "code" : "157H",
         *             "description" : "Code description",
         *             "displayName" : "Code displayname",
         *             "CodeSystem" : "Name of the Code System indicated by the OID"
         *           }
         *         ]
         *       }
         *     ]
         *     
         */
        public static ProductService.GetProductsNamesNamebeginswithResponse jsonOK(List<ProductList> entity) {
            Response.ResponseBuilder responseBuilder = Response.status(200).header("Content-Type", "application/json");
            responseBuilder.entity(entity);
            return new ProductService.GetProductsNamesNamebeginswithResponse(responseBuilder.build());
        }

    }

    public class GetProductsNamesResponse
        extends se.sll.service.catalogue.product.api.support.ResponseWrapper
    {


        private GetProductsNamesResponse(Response delegate) {
            super(delegate);
        }

        /**
         * The requested Product information was found and is returned in the body. e.g. [
         *   {
         *     "status" : "ACTIVE",
         *     "name" : "Product Name",
         *     "displayName" : "Product Displayname",
         *     "description : "Product Description",
         *     "creationTime": 1425410281000,
         *     "updateTime": 1425410281000,
         *     "updatedByHsaid" : "SE2321000016-1HF3",
         *     "codes": [
         *       {
         *         "oid" : "1.2.4.5",
         *         "code" : "157H",
         *         "description" : "Code description",
         *         "displayName" : "Code displayname",
         *         "CodeSystem" : "Name of the Code System indicated by the OID"
         *       }
         *     ]
         *   }
         * ]
         * 
         * 
         * @param entity
         *     [
         *       {
         *         "status" : "ACTIVE",
         *         "name" : "Product Name",
         *         "displayName" : "Product Displayname",
         *         "description : "Product Description",
         *         "creationTime": 1425410281000,
         *         "updateTime": 1425410281000,
         *         "updatedByHsaid" : "SE2321000016-1HF3",
         *         "codes": [
         *           {
         *             "oid" : "1.2.4.5",
         *             "code" : "157H",
         *             "description" : "Code description",
         *             "displayName" : "Code displayname",
         *             "CodeSystem" : "Name of the Code System indicated by the OID"
         *           }
         *         ]
         *       }
         *     ]
         *     
         */
        public static ProductService.GetProductsNamesResponse jsonOK(List<ProductList> entity) {
            Response.ResponseBuilder responseBuilder = Response.status(200).header("Content-Type", "application/json");
            responseBuilder.entity(entity);
            return new ProductService.GetProductsNamesResponse(responseBuilder.build());
        }

    }

    public class GetProductsResponse
        extends se.sll.service.catalogue.product.api.support.ResponseWrapper
    {


        private GetProductsResponse(Response delegate) {
            super(delegate);
        }

        /**
         * The requested Product information was found and is returned in the body. e.g. [
         *   {
         *     "status" : "ACTIVE",
         *     "name" : "Product Name",
         *     "displayName" : "Product Displayname",
         *     "description : "Product Description",
         *     "creationTime": 1425410281000,
         *     "updateTime": 1425410281000,
         *     "updatedByHsaid" : "SE2321000016-1HF3",
         *     "codes": [
         *       {
         *         "oid" : "1.2.4.5",
         *         "code" : "157H",
         *         "description" : "Code description",
         *         "displayName" : "Code displayname",
         *         "codeSystem" : "Name of the Code System indicated by the OID"
         *       }
         *     ]
         *   }
         * ]
         * 
         * 
         * @param entity
         *     [
         *       {
         *         "status" : "ACTIVE",
         *         "name" : "Product Name",
         *         "displayName" : "Product Displayname",
         *         "description : "Product Description",
         *         "creationTime": 1425410281000,
         *         "updateTime": 1425410281000,
         *         "updatedByHsaid" : "SE2321000016-1HF3",
         *         "codes": [
         *           {
         *             "oid" : "1.2.4.5",
         *             "code" : "157H",
         *             "description" : "Code description",
         *             "displayName" : "Code displayname",
         *             "codeSystem" : "Name of the Code System indicated by the OID"
         *           }
         *         ]
         *       }
         *     ]
         *     
         */
        public static ProductService.GetProductsResponse jsonOK(List<ProductList> entity) {
            Response.ResponseBuilder responseBuilder = Response.status(200).header("Content-Type", "application/json");
            responseBuilder.entity(entity);
            return new ProductService.GetProductsResponse(responseBuilder.build());
        }

    }

    public class PostProductsResponse
        extends se.sll.service.catalogue.product.api.support.ResponseWrapper
    {


        private PostProductsResponse(Response delegate) {
            super(delegate);
        }

        /**
         * Creation successful. e.g. {
         *   "status" : "ACTIVE",
         *   "name" : "Product Name",
         *   "displayName" : "Product Displayname",
         *   "description : "Product Description",
         *   "creationTime": 1425410281000,
         *   "updateTime": 1425410281000,
         *   "updatedByHsaid" : "SE2321000016-1HF3",
         *   "codes": [
         *     {
         *       "oid" : "1.2.4.5",
         *       "code" : "157H",
         *       "description" : "Code description",
         *       "displayName" : "Code displayname",
         *       "CodeSystem" : "Name of the Code System indicated by the OID"
         *     }
         *   ]
         * }
         * 
         * 
         * @param entity
         *     {
         *       "status" : "ACTIVE",
         *       "name" : "Product Name",
         *       "displayName" : "Product Displayname",
         *       "description : "Product Description",
         *       "creationTime": 1425410281000,
         *       "updateTime": 1425410281000,
         *       "updatedByHsaid" : "SE2321000016-1HF3",
         *       "codes": [
         *         {
         *           "oid" : "1.2.4.5",
         *           "code" : "157H",
         *           "description" : "Code description",
         *           "displayName" : "Code displayname",
         *           "CodeSystem" : "Name of the Code System indicated by the OID"
         *         }
         *       ]
         *     }
         *     
         */
        public static ProductService.PostProductsResponse jsonCreated(ProductList entity) {
            Response.ResponseBuilder responseBuilder = Response.status(201).header("Content-Type", "application/json");
            responseBuilder.entity(entity);
            return new ProductService.PostProductsResponse(responseBuilder.build());
        }

    }

    public class PutProductsByProductNameAddCodeResponse
        extends se.sll.service.catalogue.product.api.support.ResponseWrapper
    {


        private PutProductsByProductNameAddCodeResponse(Response delegate) {
            super(delegate);
        }

        /**
         * The code was added successfully
         * 
         */
        public static ProductService.PutProductsByProductNameAddCodeResponse oK() {
            Response.ResponseBuilder responseBuilder = Response.status(200);
            return new ProductService.PutProductsByProductNameAddCodeResponse(responseBuilder.build());
        }

    }

    public class PutProductsByProductNameCodesResponse
        extends se.sll.service.catalogue.product.api.support.ResponseWrapper
    {


        private PutProductsByProductNameCodesResponse(Response delegate) {
            super(delegate);
        }

        /**
         * The Code list for the product was successfully replaced. e.g. [
         *   {
         *     "oid" : "1.2.4.5",
         *     "code" : "157H",
         *     "description" : "Code description",
         *     "displayName" : "Code displayname",
         *     "CodeSystem" : "Name of the Code System indicated by the OID"
         *   }
         * ]
         * 
         * 
         * @param entity
         *     [
         *       {
         *         "oid" : "1.2.4.5",
         *         "code" : "157H",
         *         "description" : "Code description",
         *         "displayName" : "Code displayname",
         *         "CodeSystem" : "Name of the Code System indicated by the OID"
         *       }
         *     ]
         *     
         */
        public static ProductService.PutProductsByProductNameCodesResponse jsonOK(List<Code> entity) {
            Response.ResponseBuilder responseBuilder = Response.status(200).header("Content-Type", "application/json");
            responseBuilder.entity(entity);
            return new ProductService.PutProductsByProductNameCodesResponse(responseBuilder.build());
        }

    }

    public class PutProductsResponse
        extends se.sll.service.catalogue.product.api.support.ResponseWrapper
    {


        private PutProductsResponse(Response delegate) {
            super(delegate);
        }

        /**
         * Update successful. e.g. {
         *   "status" : "ACTIVE",
         *   "name" : "Product Name",
         *   "displayName" : "Product Displayname",
         *   "description : "Product Description",
         *   "creationTime": 1425410281000,
         *   "updateTime": 1425410281000,
         *   "updatedByHsaid" : "SE2321000016-1HF3",
         *   "codes": [
         *     {
         *       "oid" : "1.2.4.5",
         *       "code" : "157H",
         *       "description" : "Code description",
         *       "displayName" : "Code displayname",
         *       "CodeSystem" : "Name of the Code System indicated by the OID"
         *     }
         *   ]
         * }
         * 
         * 
         * @param entity
         *     {
         *       "status" : "ACTIVE",
         *       "name" : "Product Name",
         *       "displayName" : "Product Displayname",
         *       "description : "Product Description",
         *       "creationTime": 1425410281000,
         *       "updateTime": 1425410281000,
         *       "updatedByHsaid" : "SE2321000016-1HF3",
         *       "codes": [
         *         {
         *           "oid" : "1.2.4.5",
         *           "code" : "157H",
         *           "description" : "Code description",
         *           "displayName" : "Code displayname",
         *           "CodeSystem" : "Name of the Code System indicated by the OID"
         *         }
         *       ]
         *     }
         *     
         */
        public static ProductService.PutProductsResponse jsonOK(ProductList entity) {
            Response.ResponseBuilder responseBuilder = Response.status(200).header("Content-Type", "application/json");
            responseBuilder.entity(entity);
            return new ProductService.PutProductsResponse(responseBuilder.build());
        }

    }

}
